//
//  HomeTaskView.swift
//  LeGou
//
//  Created by lxm on 2022/7/27.
//

import UIKit

class HomeTaskView: ZMXIBView {

    //MARK: --------------------属性--------------------
    var estimateHeight : CGFloat {
        65
    }
    //MARK: --------------------UI控件--------------------
    var onClickCallback : ((_ type : Int)->())?
    
    @IBOutlet weak var xsrw: UILabel!
    
    @IBOutlet weak var ljzq: UILabel!
    @IBOutlet weak var taskContent: UIView!
    //MARK: --------------------生命周期--------------------
    override init(frame: CGRect) {
        super.init(frame: frame)
        setUI()
        bindAction()
        addConstraints()
    }
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        setUI()
        bindAction()
        addConstraints()
        if AppHelper.appVerify() {
            xsrw.text = "多快好省"
            ljzq.text = "立即省钱"
        }
    }

    //MARK: --------------------UI--------------------
    func setUI() {
        snp.makeConstraints { make in
            make.height.equalTo(65)
        }
    }
    
    func addConstraints() {
     
    }
    
    //MARK: --------------------methods--------------------
    func bindAction() {
        
    }
    
    @IBAction func onClick(_ sender: UIButton) {
        if let onClickCallback = onClickCallback {
            onClickCallback(sender.tag - 100)
        }
    }
    
    //MARK: --------------------delegate--------------------

}
